package com.samuel.blog.controller.admin;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.samuel.blog.controller.BaseController;

/**
 * @author kaiji
 */
@Controller
@RequestMapping("admin")
public class HomeController extends BaseController {

	private static final long serialVersionUID = -6993541639843645336L;
	private static final Logger logger = Logger.getLogger(HomeController.class);
	private static final String PRE = "home/";
	private static final String PRE_PAGER = "admin/home_";

	@RequestMapping(value = PRE + "index" + SUFFIX)
	public String index(HttpServletRequest request) {
		logger.info("进入首页~~~~~~~~~~~");
		this.configCss(request, "home", null);
		return PRE_PAGER+"index";
	}
	
	@RequestMapping(value = PRE + "message" + SUFFIX)
	public String message(HttpServletRequest request) {
		request.setAttribute("message", "您没有权限！");
		return MESSAGE_PAGE;
	}
}
